
using System;

namespace Graph
{
	public class Knoten
	{
		private int id;
				// Zeiger auf den Vorgänger Knoten beim Graph-Scanning
				
		public Knoten ()
		{
			this.id = 0;
		}
		
		public Knoten (int id)
		{
            this.id = id;
		}		
		
		public int Id
		{
			get{return this.id;}
		}		
	}
	
	public class DijkstraKnoten : Knoten, IKey
	{
		public int HeapPos;
		public double distance;
		public Knoten predeseccor;

		public DijkstraKnoten ()
		{
			distance = Double.MaxValue;
			predeseccor = null;
			HeapPos = 0;
		}

		public DijkstraKnoten (int id) : base(id)
		{
			distance = Double.MaxValue;
			predeseccor = null;
			HeapPos = 0;
		}
		
		public DijkstraKnoten (int id, int Distance, DijkstraKnoten Predeseccor, double Realdist, int X, int Y) : base(id)
		{
			distance = Distance;
			predeseccor = Predeseccor;
			HeapPos = 0;

		}

		public double getKey ()
		{
			return distance;
		}

		public void setKey (double Key)
		{
			distance = Key;
		}

		public int getHeapPos ()
		{
			return HeapPos;
		}

		public void setHeapPos (int Pos)
		{
			HeapPos = Pos;
		}
	}
}
